%ODE45

f=@(x,y) -15*y;

% Calculate exact solution
g=@(x) exp(-15*x);
xe=0:0.01:1;
ye=g(xe);

% Call function
[x1,y1]=ode45(f,[0 1],1);

% Plot
plot(xe,ye,'k-',x1,y1,'k:')
xlabel('x')
ylabel('y')
legend('Analytical','ode45')
axis([0 1 0 1])